package fanalg;

/**
 * Class representing a decision node in the decision tree
 * @author Tomasz Werszko
 *
 */
public class DecisionNode {
	/**
	 * The flag
	 */
	protected boolean flag = false;
	
	public String input = "";
	
	public DecisionNode(String name){
		this.input = name;
	}
	/**
	 * Sets the flag
	 * @return
	 */
	public boolean setFlag(){
		if(this.flag){
			return false;
		}else{
			this.flag = true;
			return true;
		}
	}
	public boolean isFlagged(){
		return this.flag;
	}
	public boolean removeFlag(){
		if(!this.flag){
			return false;
		}else{
			this.flag = false;
			return true;
		}
	}
}
